<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          
 <html xmlns="http://www.w3.org/1999/xhtml" 
 	   xmlns:ui="http://java.sun.com/jsf/facelets"
 	   xmlns:f="http://java.sun.com/jsf/core" 
	   xmlns:h="http://java.sun.com/jsf/html"
	   xmlns:t="http://myfaces.apache.org/tomahawk">
 	<body>
 	<!-- common menu for all pages -->
 	<ui:composition >
		<t:panelGrid  columns="2">
			<t:outputText value="Summary" />
			<t:panelGroup>
				<t:inputText id="summary" label="summary" value="#{manageTestPlansBean.summary}" required="true" >
					<f:validateLength minimum="2" maximum="25" />
				</t:inputText>
				<t:message for="summary" errorStyle="color:red; text-decoration:overline" />
			</t:panelGroup>
			<t:outputText value="Test cycle" />
			<t:panelGroup>
				<t:inputText id="test_cycle" label="test_cycle" value="#{manageTestPlansBean.testCycle}" >
					<f:validateLength minimum="2" maximum="25" />
				</t:inputText>
				<t:message for="test_cycle" errorStyle="color:red; text-decoration:overline" />
			</t:panelGroup>
			<t:outputText value="Planned time" />
			<t:panelGroup>
				<t:inputText id="planned_time" label="planned_time" value="#{manageTestPlansBean.planedTime}" >
					<f:validateDoubleRange minimum="0"  />
				</t:inputText>
				<t:message for="planned_time" errorStyle="color:red; text-decoration:overline" />
			</t:panelGroup>
			<t:outputText value="Start date/dd-MM-yyyy" />
			<t:panelGroup>
				<t:inputText id="start_date" label="start_date" value="#{manageTestPlansBean.startDate}">
					<f:convertDateTime pattern="dd-MM-yyyy"/>
				</t:inputText>
				<t:message for="start_date" errorStyle="color:red; text-decoration:overline" />
			</t:panelGroup>
			<t:outputText value="End date/dd-MM-yyyy" />
			<t:panelGroup>
				<t:inputText id="end_date" label="end_date" value="#{manageTestPlansBean.endDate}">
					<f:convertDateTime pattern="dd-MM-yyyy"/>
				</t:inputText>
				<t:message for="end_date" errorStyle="color:red; text-decoration:overline" />
			</t:panelGroup>
			<t:outputText value="Product" />
			<t:selectOneMenu 
					value="#{manageTestPlansBean.product}"  
					converter="#{manageUsersBean.productConverter}" >
				<f:selectItems value="#{manageTestPlansBean.productList}" />	
			</t:selectOneMenu>
			<t:outputText value="Test cases" />	
			<t:selectManyListbox   size="6" value="#{manageTestPlansBean.searchWordTestCase}" >
				<f:selectItems value="#{manageTestPlansBean.caseList}" />	
			</t:selectManyListbox>
			<t:commandButton action="#{manageTestPlansBean.createTestPlan}" value="create" />
			<t:commandButton action="plansList" value="cancel" immediate="true"/>
		</t:panelGrid>
    </ui:composition>
	</body>
 </html>